package com.zmn.plat.dubbo.interfaces.orderconfig.track;

import java.util.List;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import javax.validation.constraints.Size;

import com.zmn.common.dto2.ResponseDTO;
import com.zmn.plat.common.dto.orderconfig.track.OrderTrackDIO;
import com.zmn.plat.common.dto.orderconfig.track.OrderTrackDRO;
import com.zmn.plat.dubbo.utils.DubboConsts;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

/**
 * @author tanbiao
 * @description:订单配置
 * @modifier
 * @since 2020/11/24 9:54
 **/
@Api(value = "订单配置服务", tags = {"订单配置"})
public interface OrderTrackListRemoteService {

    /**
     * 描述: 根据主键查询跟单配置信息
     *
     * @param trackId
     * @return OrderCancelCategoryDRO
     * @auther: tanbiao
     * @since: 2020/11/24 11:11
     */
    @ApiOperation(value = "根据主键查询订单配置", response = ResponseDTO.class, notes = "", tags = {"订单配置"})
    ResponseDTO<OrderTrackDRO> getById(@NotNull(message = "跟单内容id不能为空") @Positive(message = "跟单内容id必须为大于0的正整数") @ApiParam(value = "跟单内容id", required = true) Integer trackId);

    /**
     * 描述: 根据主键查询跟单配置信息
     *
     * @param trackIds
     * @return OrderCancelCategoryDRO
     * @auther: tanbiao
     * @since: 2020/11/24 11:11
     */
    @ApiOperation(value = "根据主键查询订单配置", response = ResponseDTO.class, notes = "", tags = {"订单配置"})
    ResponseDTO<List<OrderTrackDRO>> listByTrackIds(@NotEmpty(message = "trackIds参数不能为空且个数不能超过" + DubboConsts.MAX_PARAM_LENGTH) @Size(min = 1, max = DubboConsts.MAX_PARAM_LENGTH,
        message = "trackIds参数不能为空且个数不能超过" + DubboConsts.MAX_PARAM_LENGTH) @ApiParam(value = "跟单配置主键id集合", required = true) List<Integer> trackIds);

    /**
     * 描述: 根据业务类型和跟单类型id查询，不包括跟单缘由附加信息trackReasonList
     *
     * @param categId
     *            可为空
     * @param bizType
     *            可为空
     * @return OrderCancelCategoryDRO
     * @auther: tanbiao
     * @since: 2020/11/24 11:11
     */
    @ApiOperation(value = "根据跟单类型和业务类型查询订单配置", response = ResponseDTO.class, notes = "", tags = {"订单配置"})
    ResponseDTO<List<OrderTrackDRO>> listByCategIdAndBizType(@Positive(message = "跟单类型必须为大于0的正整数") @ApiParam(value = "跟单类型", required = true) Integer categId,
        @Positive(message = "业务类型必须为大于0的正整数") @ApiParam(value = "业务类型", required = true) Integer bizType);

    /**
     * 描述: 根据主键查询跟单配置信息，包括跟单内容对应的跟单缘由
     *
     * @param dio
     * @return OrderCancelCategoryDRO
     * @auther: tanbiao
     * @since: 2020/11/24 11:11
     */
    @ApiOperation(value = "根据条件查询订单配置", response = ResponseDTO.class, notes = "", tags = {"订单配置"})
    ResponseDTO<List<OrderTrackDRO>> listByDIO(@NotNull(message = "入参不能为空") @Valid @ApiParam(value = "查询条件", required = true) OrderTrackDIO dio);

}
